[Logs UI] Create ML module for log analysis#42872
Merged
jasonrhodes merged 7 commits intoelastic:masterfrom Aug 14, 2019
Merged
[Logs UI] Create ML module for log analysis#42872jasonrhodes merged 7 commits intoelastic:masterfrom
jasonrhodes merged 7 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/infra-logs-ui |
Contributor
💚 Build Succeeded |
11 tasks
Contributor
💚 Build Succeeded |
The overrides are recursively merged and therefore additive. Therefore we can't specify the timestamp agg here, because it could not be overridden later with a different field and agg name. It needs to be solely specified at setup time.
Contributor
💚 Build Succeeded |
…tegration-module-definition
Contributor
💚 Build Succeeded |
Member
|
@elastic/ml-ui any feedback you all have or anything else you need from us on this? We are beginning to build the UI that connects to this endpoint and are hoping to test it soon. Thanks! |
Contributor
💚 Build Succeeded |
walterra
approved these changes
Aug 14, 2019
…tegration-module-definition
Contributor
💚 Build Succeeded |
jasonrhodes
added a commit
that referenced
this pull request
Aug 14, 2019
* Add ml module with hard-coded timestamp field * Fix data_recognizer test * Parameterize the bucket span normalization * Remove max agg which will be specified during setup The overrides are recursively merged and therefore additive. Therefore we can't specify the timestamp agg here, because it could not be overridden later with a different field and agg name. It needs to be solely specified at setup time.
This was referenced Aug 16, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This adds an ML module called
logs_ui_analysis, which contains a job definition to detect anomalies in the log rate.log-entry-rateanalysis_config.bucket_spandata_description.time_fielddatafeed-log-entry-rate:aggregations.buckets.date_histogram.fieldaggregations.buckets.date_histogram.fixed_intervalaggregations.buckets.aggregations[timestampField]aggregations.buckets.aggregations[timestampField].max.fieldaggregations.buckets.aggregations.doc_count_per_minute.bucket_script.script.params.bucket_span_in_mscloses #42593
Implementation notes
doc_countto one minute using abucket_scriptaggregation calleddoc_count_per_minute. That aggregation is used as thesummary_count_field_namein the job configuration. The scaling has several advantages:1in the unit reduce the risk of misinterpretation (doc_count / minutecompared todoc_count / (15 minutes).Testing hints
The module can be deployed via a call to Kibana's ML module setup api at
/api/ml/modules/setup/logs_ui_analysis. ThePOSTrequests body needs to specify a few parameters, e.g.:{ "indexPatternName": "filebeat-*", "prefix": "kibana-logs-ui-testspace-default-", "startDatafeed": true, "jobOverrides": [ { "job_id": "log-entry-rate", "analysis_config": { "bucket_span": "900000ms" }, "data_description": { "time_field": "@timestamp" } } ], "datafeedOverrides": [ { "job_id": "log-entry-rate", "aggregations": { "buckets": { "date_histogram": { "field": "@timestamp", "fixed_interval": "900000ms" }, "aggregations": { "@timestamp": { "max": { "field": "@timestamp" } }, "doc_count_per_minute": { "bucket_script": { "script": { "params": { "bucket_span_in_ms": 900000 } } } } } } } } ] }